/**
 * file: test14.v
 * Module instantiation test:
 *  'by name' connections
 */

module cucu;

 wire [1:0] win = ww, wout;
 reg [1:0] ww;
 bau bb(win, wout[0]); //aici e o conexiune normala
 bau bb1(.o(), .inp(win)); //conexiuni 'by name' cu un port neconectat
 bau bb2(.o(wout[0]), .inp(win)); //o conexiune 'by name' normala
 
 initial begin
   ww = 0;
   #1;
   $cout(wout);
/*   ww = 1;
   $cout(ww);
   #1;
   ww = 0;  */
 end
endmodule

module bau(.inp(i), o);
 input [1:0] i;
 output o;
 wire [1:0] i;
 wire o = i[0];
endmodule
